package com.training1.core.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.ibatis.type.Alias;

import com.training1.core.common.entity.DataEntity;
@Alias("NoticeMsg")
public class NoticeMsgEntity extends DataEntity{

	private static final long serialVersionUID = -784517448221936511L;
	
	
	private String msgTitle;
	
	private Date publishStartTime;
	
	private String publishStartTimeStr;
	
	private Date publishEndTime;
	
	private String publishEndTimeStr;
	
	private String userName;
	
	private int type;
	
	private String content;
	


	public String getMsgTitle() {
		return msgTitle;
	}

	public void setMsgTitle(String msgTitle) {
		this.msgTitle = msgTitle;
	}

	public Date getPublishStartTime() {
		return publishStartTime;
	}

	public void setPublishStartTime(Date publishStartTime) {
		this.publishStartTime = publishStartTime;
		if(publishStartTime != null){
			String format = new SimpleDateFormat("yyyy-MM-dd").format(publishStartTime);
			this.setPublishStartTimeStr(format);
		}
	}

	public Date getPublishEndTime() {
		return publishEndTime;
	}

	public void setPublishEndTime(Date publishEndTime) {
		this.publishEndTime = publishEndTime;
		if(publishEndTime != null){
			String format = new SimpleDateFormat("yyyy-MM-dd").format(publishEndTime);
			this.setPublishEndTimeStr(format);
		}
	}

	
	public String getPublishEndTimeStr() {
		return publishEndTimeStr;
	}

	public void setPublishEndTimeStr(String publishEndTimeStr) {
		this.publishEndTimeStr = publishEndTimeStr;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPublishStartTimeStr() {
		return publishStartTimeStr;
	}

	public void setPublishStartTimeStr(String publishStartTimeStr) {
		this.publishStartTimeStr = publishStartTimeStr;
	}
	
	
	
}
